#!/bin/bash


user=wqshao
my_home=/home/fpga/user/$user

IN_DIR=$1
OUT_DIR=$my_home/$2

if [ $# != 2 ]; then
	echo "usage: cpfpga aaa bbb"
	echo "           bbb is dirs"
	exit 0
fi

ssh fpga@192.168.4.13 "[[ -d $OUT_DIR ]] || mkdir -p $OUT_DIR"
if [ $? -ne 0 ]; then
	echo "ssh connect error ..."
	exit 1;
fi

scp -r $IN_DIR fpga@192.168.4.13:$OUT_DIR
echo "scp $arg $IN_DIR fpga@192.168.4.13:$OUT_DIR"
